package com.ruoyi.system.service.impl;

import java.util.List;
import cn.hutool.core.util.ObjectUtil;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AVipUserDetailMapper;
import com.ruoyi.system.domain.AVipUserDetail;
import com.ruoyi.system.service.IAVipUserDetailService;

/**
 * 会员用户详情Service业务层处理
 *
 * @author system
 * @date 2025-01-07
 */
@Service
public class AVipUserDetailServiceImpl implements IAVipUserDetailService {
    @Autowired
    private AVipUserDetailMapper aVipUserDetailMapper;

    /**
     * 查询会员用户详情
     *
     * @param id 会员用户详情主键
     * @return 会员用户详情
     */
    @Override
    public AVipUserDetail selectAVipUserDetailById(Long id) {
        return aVipUserDetailMapper.selectAVipUserDetailById(id);
    }

    /**
     * 查询会员用户详情列表
     *
     * @param aVipUserDetail 会员用户详情
     * @return 会员用户详情
     */
    @Override
    public List<AVipUserDetail> selectAVipUserDetailList(AVipUserDetail aVipUserDetail) {
        return aVipUserDetailMapper.selectAVipUserDetailList(aVipUserDetail);
    }

    /**
     * 新增会员用户详情
     *
     * @param aVipUserDetail 会员用户详情
     * @return 结果
     */
    @Override
    public int insertAVipUserDetail(AVipUserDetail aVipUserDetail) {
        aVipUserDetail.setCreateTime(DateUtils.getNowDate());
        return aVipUserDetailMapper.insertAVipUserDetail(aVipUserDetail);
    }

    /**
     * 修改会员用户详情
     *
     * @param aVipUserDetail 会员用户详情
     * @return 结果
     */
    @Override
    public int updateAVipUserDetail(AVipUserDetail aVipUserDetail) {
        aVipUserDetail.setUpdateTime(DateUtils.getNowDate());
    return aVipUserDetailMapper.updateAVipUserDetail(aVipUserDetail);
    }

    /**
     * 批量删除会员用户详情
     *
     * @param ids 需要删除的会员用户详情主键
     * @return 结果
     */
    @Override
    public int deleteAVipUserDetailByIds(Long[] ids) {
        return aVipUserDetailMapper.deleteAVipUserDetailByIds(ids);
    }

    /**
     * 删除会员用户详情信息
     *
     * @param id 会员用户详情主键
     * @return 结果
     */
    @Override
    public int deleteAVipUserDetailById(Long id) {
        return aVipUserDetailMapper.deleteAVipUserDetailById(id);
    }

    /**
     * 批量逻辑删除会员用户详情
     *
     * @param ids 需要删除的会员用户详情主键
     * @return 结果
     */
    @Override
    public int logicDeleteAVipUserDetailByIds(Long[] ids) {
        return aVipUserDetailMapper.logicDeleteAVipUserDetailByIds(ids);
    }
    /**
     * 逻辑删除会员用户详情信息
     *
     * @param id 会员用户详情主键
     * @return 结果
     */
    @Override
    public int logicDeleteAVipUserDetailById(Long id) {
        return aVipUserDetailMapper.logicDeleteAVipUserDetailById(id);
    }

}
